home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Views / Tiled Views / RuledPaneColumnOfHeight.h < prev    next >
Text File  |  2000-06-23  |  932b  |  42 lines

  1. // RuledPaneColumnOfHeight.h
  2.  
  3. #ifndef RuledPaneColumnOfHeight_h
  4. #define RuledPaneColumnOfHeight_h
  5.  
  6. #ifndef PaneColumnOfHeight_h
  7. #include "PaneColumnOfHeight.h"
  8. #endif
  9. #ifndef ViewCell_h
  10. #include "ViewCell.h"
  11. #endif
  12. #ifndef HorizontalBar_h
  13. #include "HorizontalBar.h"
  14. #endif
  15.  
  16. template <uint32 nonRulePanes>
  17. class RuledPaneColumnOfHeight: public PaneColumnOfHeight< 2 * nonRulePanes - 1 >
  18.   {
  19.     public:
  20.         RuledPaneColumnOfHeight()
  21.           {
  22.             static const HorizontalBar<1> horizontalLine;
  23.             for ( uint32 i = 1; i < 2 * nonRulePanes - 1; i+=2 )
  24.               {
  25.                 PaneColumnOfHeight::operator[](i).SetContent( ViewCell::Black() );
  26.                 PaneColumnOfHeight::operator[](i).SetSizer( horizontalLine );
  27.               }
  28.           }
  29.         
  30.         RectangularPane& operator[]( uint32 i )
  31.           {
  32.             return PaneColumnOfHeight::operator[]( 2*i );
  33.           }
  34.         
  35.         const RectangularPane& operator[]( uint32 i ) const
  36.           {
  37.             return PaneColumnOfHeight::operator[]( 2*i );
  38.           }
  39.   };
  40.  
  41. #endif
  42.